﻿<%@ Page Title="" Language="C#" MasterPageFile="AdminMsaster.master" AutoEventWireup="true" CodeFile="ReaderReturnBook.aspx.cs" Inherits="Admin_ReaderReturnBook" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script src="assets/js/jquery-1.10.2.js"></script>
    <!-- Bootstrap Js -->
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js"></script>
    <!-- DATA TABLE SCRIPTS -->
    <script src="assets/js/dataTables/jquery.dataTables.js"></script>
    <script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
  
    <script src="assets/js/model.js"></script>
    <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>">
        <SelectParameters>
            <asp:Parameter Name="name" />
        </SelectParameters>
    </asp:SqlDataSource>
    <div id="page-wrapper">
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">
                    <h1 class="page-header">图书归还<small> 为读者归还借阅的图书</small>
                    </h1>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3>* 输入读者编号，查询该读者借书情况，检查书籍完好性，确认即可归还书籍</h3>
                        </div>
                        <br />
                        <p></p>
                        <div class="row">
                            <div class="col-md-12">
                              <p style="font-family:'Microsoft YaHei UI';font-size:19px;float:left;padding-left:20px;"><B>输入图书编号:</B></p> <asp:TextBox ID="TBbookid" class="form-control" runat="server" Style="width: 180px; float: left;margin-top: 16px;margin-left:12px;"></asp:TextBox>
                            <!--   <p style="font-family:'Microsoft YaHei UI';font-size:19px;float:left;padding-left:20px;"><B>输入读者编号:</B></p> <asp:TextBox ID="TextBox1" class="form-control" runat="server" Style="width: 180px; float: left;margin-top: 16px;margin-left:12px;"></asp:TextBox>-->
                              
                                 <asp:Button ID="chaxun" CssClass="btn btn-primary" OnClick="chaxun_Click" runat="server" Text="获取图书借阅信息" style="float: left;margin-top: 16px;margin-left:20px;" />
                                  </div>
                        </div>
                        <hr />

                        <div class="panel-body">
                             <div class="panel-heading">
                            <h3>* 确认书籍信息和读者信息：</h3>
                        </div>
                            <div class="table-responsive">
                                <!-- 数据源开始 -->

                                <asp:GridView ID="mybookdata" class="mytablestyle table table-striped table-bordered table-hover" runat="server" DataSourceID="SqlDataSource1">

                                    <Columns>
                                        <asp:TemplateField HeaderText="选择">
                                            <ItemStyle HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <asp:CheckBox ID="CheckBox" CssClass="checkbox" runat="server"></asp:CheckBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                                <!-- 数据源结束 -->
                                <br />

                                <asp:Button ID="Cancel" CssClass="btn btn-default" runat="server" Text="取消选择" Style="float: right; padding-left: 20px;" OnClick="Cancel_Click" />
                                <asp:Button ID="sureBorrow" CssClass="btn btn-primary" runat="server" Text="确认归还" Style="float: right;" OnClick="sureBorrow_Click" />
                                <button class="btn btn-primary" style="float: left;"  data-toggle="modal" data-target="#myModal">罚款选项</button>
 
                                <script> window.onload = function asdasd() {
     $("#ContentPlaceHolder1_mybookdata tr:first").wrap("<thead></thead>");
     $("#ContentPlaceHolder1_mybookdata thead").insertBefore("#GriView1 tbody");
     $("#ContentPlaceHolder1_mybookdata").dataTable();
 }</script>
                            </div>

                        </div>
                        

                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BooksManagerSystemConnectionString %>" SelectCommand="SELECT [AmerceTypeID], [AmerceName] FROM [Amerce_info]"></asp:SqlDataSource>

                        <%=tips %>



<!-- 按钮触发模态框 -->




<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					读者归还罚款设置
				</h4>
			</div>
			<div class="modal-body">
				<p style="text-align:center;"><B>请确认下面罚款信息并确认</B></p>
                    <p style="text-overflow: ellipsis; white-space: nowrap; padding-left:20px;    padding-top: 0px;">图书名称：<code style="font-family:FZBeiWeiKaiShu-S19S;color:#41B300;font-size:100%"><%=bookname %></code></p>
                    <p style="text-overflow: ellipsis; white-space: nowrap; padding-left:20px;    padding-top: 0px;">读者姓名：<code style="font-family:FZBeiWeiKaiShu-S19S;color:#41B300;font-size:100%"><%=readername %></code></p>
                    <p style="float:left; padding-left:20px;    padding-top: 0px;">罚款类型：</p>
                     <asp:DropDownList ID="fakuanDlist"  CssClass="form-control" style="width:180px;padding-left:0px;height:30px; float:left;"   runat="server" DataSourceID="SqlDataSource2" DataTextField="AmerceName" DataValueField="AmerceTypeID"></asp:DropDownList>
                    <p style="float:left;  padding-top: 0px;">罚款金额：</p>
                    <asp:TextBox ID="AmeNum" CssClass="form-control" runat="server"  style="width:180px;padding-left:0px;height:30px;" TextMode="Password"></asp:TextBox>
                    
                    
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭
				</button>
				<asp:Button ID="sureAme" CssClass="btn btn-primary" style="height:30px;float:right;margin-right:20px;font-family:'Microsoft YaHei';"  OnClick="sureAme_Click" runat="server" Text="确认罚款并归还" />
				
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>






                    <!--End Advanced Tables -->
                </div>

            </div>
            <!-- /. ROW  -->



        </div>

        <!-- /. PAGE INNER  -->
    </div>
    <script>
        function loadtable() {
            $("#ContentPlaceHolder1_mybookdata tr:first").wrap("<thead></thead>");
            $("#ContentPlaceHolder1_mybookdata thead").insertBefore("#GriView1 tbody");
            $("#ContentPlaceHolder1_mybookdata").dataTable();
        };
    </script>




</asp:Content>

